home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / database / postgres / appgen-0.2-a / appgen-0 / AppGEN / src / lib / error.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-10  |  643 b   |  18 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void ag_error(char *message, char *query)
  5. {
  6.     printf("Content-Type: text/html\n\n");
  7.     printf("<HTML><TITLE>Runtime Error</TITLE>\n");
  8.     printf("<BODY BGCOLOR=\"#ffffff\">\n");
  9.     printf("<H1><IMG SRC=\"/ag/appgen.gif\">Runtime SQL Error</H1>\n");
  10.     printf("An error has occured in your application, the message was:<BR><BR>\n");
  11.     printf("<B><CODE>%s</CODE></B><BR><BR>\n",message);
  12.     printf("The submitted query was:<BR><BR>\n");
  13.     printf("<B><CODE>%s</CODE></B><BR><BR>\n",query);
  14.     printf("The parameters are:<BR><BR>\n");
  15.     printf("<B><CODE>%s</CODE></B></BODY></HTML>\n",getenv("QUERY_STRING"));
  16.     exit(0);
  17. }
  18.